package com.realshare.frame.util.excel.model;

import java.util.ArrayList;
import java.util.List;

public class ExcelEntity {

    private String downloadPath;
    private String excelName;
    private List<ExcelRow> titles;
    private List<ExcelRow> contents;

    public String getDownloadPath() {
        return downloadPath;
    }

    public void setDownloadPath(String downloadPath) {
        this.downloadPath = downloadPath;
    }

    public String getExcelName() {
        return excelName;
    }

    public void setExcelName(String excelName) {
        this.excelName = excelName;
    }

    public List<ExcelRow> getContents() {
        return contents;
    }

    public void setContents(List<ExcelRow> contents) {
        this.contents = contents;
    }

    public List<ExcelRow> getTitles() {
        return titles;
    }

    public void setTitles(List<ExcelRow> titles) {
        this.titles = titles;
    }

    public ExcelRow getTitle() {
        return titles != null && titles.size() > 0 ? titles.get(0) : null;
    }

    public void setTitle(ExcelRow title) {
        this.titles = new ArrayList<ExcelRow>();
        titles.add(title);
    }
}
